<?php
/**
 * OrderApproval
 *
 * @category design
 * @package base_default
 */
?>

<?php

$_item = $this->getQuoteItem();
$_images = $this->getImages();

?>

<tr>
  <td>
    <h2 style="font-size:18px; font-weight:normal; line-height:18px; margin:0 0 5px 0;"><?php echo $_item->getName(); ?></h2>
  </td>
</tr>

<?php if ($_images): ?>
<tr>
  <td colspan="4" style="padding:3px 9px;">

  <?php foreach ($_images as $_image): ?>
    <a href="<?php echo $_image; ?>" style="text-decoration: none" target="_blank">
      <img src="<?php echo $_image ?>" style="max-height: 100px" title="<?php echo $this->__('Click to enlarge image');?>" />
    </a>
  <?php endforeach ?>

  </td>
</tr>
<?php endif; ?>

<tr>

  <?php $_pdfProof = $this->getPdfProof(); ?>

  <?php if ($_pdfProof): ?>
  <td>
    <a style="font-size:14px; font-weight:normal; line-height:14px;" href="<?php echo $_pdfProof; ?>"><?php echo $this->__('PDF Proof'); ?></a>
  </td>
  <?php endif; ?>

  <?php if ($this->getIsEmailForApprover()): ?>
  <td>
    <a style="font-size:14px; font-weight:normal; line-height:14px;" href="<?php echo $this->getApproveUrl(); ?>">
      <?php echo $this->__('Approve'); ?>
    </a>
  </td>

  <td>
    <a style="font-size:14px; font-weight:normal; line-height:14px;" href="<?php echo $this->getDeclineUrl(true); ?>">
      <?php echo $this->__('Decline'); ?>
    </a>
  </td>
  <?php endif; ?>

</tr>

<?php if ($_item->getApproved() == ZetaPrints_OrderApproval_Helper_Data::DECLINED): ?>
<tr>
  <td>
    <p style="font-size:14px; font-weight:bold; line-height:14px; margin:0;"><?php echo Mage::helper('orderapproval')->getNoticeFromItem($_item); ?></p>
  </td>
</tr>
<?php endif; ?>
